$(function(){
	$("body").on("click",".gyzx_ysy",link1);
	$("body").on("click",".zyty_ysy",link2);
	$("#menu_1").on("click", menu);
	$("#menu_2").on("click", menu);
	$("#menu_3").on("click", menu);
	$("#menu_4").on("click", menu);
	$("#menu_5").on("click", menu);
	
});

function showCity() {
    $("#citys").show();
}
function hideCity(m) {
    $('#citys').hide();
    $(".location").text($(m).text());

}

function link1(){
	window.location.href="./community_ljw/community_ljw.html";
}
function link2(){
	window.location.href="./occupational_experience/occupational_experience_wrf.html";
}

//导航切换
var state = 1;
function menu() {
	var obj = this;
	state++;
	/*把四格图标换成灰色*/
		$("#menu_1 img").attr("src", "../../../img/app/index/meu/shouye.png");
	$("#menu_2 img").attr("src", "../../../img/app/index/meu/fenlei.png");
	$("#menu_3 img").attr("src", "../../../img/app/index/meu/fenxiang.png");
	$("#menu_4 img").attr("src", "../../../img/app/index/meu/shoucang.png");
	$("#menu_5 img").attr("src", "../../../img/app/index/meu/wode.png");
	$("#menu_1 span").css("color", "rgb(153,153,153)");
	$("#menu_2 span").css("color", "rgb(153,153,153)");
	$("#menu_3 span").css("color", "rgb(153,153,153)");
	$("#menu_4 span").css("color", "rgb(153,153,153)");
	$("#menu_5 span").css("color", "rgb(153,153,153)");
	var index = "1";
	if(state != 1) {
		index = $(obj).attr("id").split("_")[1];
	}
	var url = "";
	var jump_url = "";//=======这里可以填写跳转路径===============
	switch(index) {
		case "1":
			url = "../../../img/app/index/meu/shouyese.png";
			jump_url="";
			break;
		case "2":
			url = "../../../img/app/index/meu/fenleise.png";
			jump_url="";
			break;
		case "3":
			url = "../../../img/app/index/meu/fenxiangse.png";
			jump_url="";
			break;
		case "4":
			url = "../../../img/app/index/meu/shoucangse.png";
			jump_url="";
			break;
		case "5":
			url = "../../../img/app/index/meu/wodese.png";
			jump_url="";
			break;
	}
	if(state != 1) {
		$(obj).children().eq(0).children().eq(0).attr("src", url);
		$(obj).children().eq(1).css("color", "rgb(250,172,20)");
//		window.location.href=jump_url;    //跳转
	} else {
		$("#menu_1").children().eq(0).attr("src", url);
	}
	
	
	
}
